package com.face.dao;

import com.face.entity.Visit;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.face.entity.Shop;
import com.face.mapper.ShopMapper;

@Repository
public class ShopDao {
	
	@Autowired
	private ShopMapper shopMapper;
	
	public Shop getShop(String shopId,String deviceId) {
		Shop shop = shopMapper.getShop(shopId, deviceId);
		return shop;		 
    }

	public  Integer saveVisit(Visit visit){
		return shopMapper.saveVisit(visit);

	}

    public void save(Shop shop) {
		shopMapper.save(shop);
    }

    public Shop findByShopId(String shopId) {
		return shopMapper.findByShopId(shopId);
    }

	public void update(Shop shop) {
		shopMapper.update(shop);
	}

    public Shop findShopByActiveCode(String activeCode) {
		return shopMapper.findShopByActiveCode(activeCode);
    }
}
